package com.example.myblog.service;

import com.example.myblog.dto.BlogDTO;
import com.example.myblog.dto.BlogMapDTO;
import com.example.myblog.dto.BlogMessageDTO;
import com.example.myblog.dto.BlogSearchDTO;
import com.example.myblog.entity.Blog;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.myblog.exception.BaseException;
import com.example.myblog.vo.BlogVO;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 博客 服务类
 * </p>
 *
 * @author 叶兴
 * @since 2022-09-29
 */
public interface BlogService extends IService<Blog> {

    int insertBlog( BlogVO blogVO);

    int deleteBlog(String id) throws BaseException;

    BlogMessageDTO getOneBlog(String id);

    Map<String, List<BlogMapDTO>> getBlogArchives();

    int blogCount();

    List<BlogSearchDTO> searchBlog(String query);
}
